﻿'Imports Lucene.Net.Analysis
'Imports Lucene.Net.QueryParsers
'Imports Lucene.Net.Search
'Imports Aricie.DNN.Modules.LuceneSearch.Common.Constants

'Namespace Aricie.DNN.Modules.LuceneSearch.Business
'    ''' <summary>
'    ''' * Overrides Lucene's default QueryParser so that Fuzzy-, Prefix-, Range-, and WildcardQuerys
'    ''' * are also passed through the given analyzer, but wild card characters (like <code>*</code>) 
'    ''' * don't get removed from the search terms.
'    ''' * 
'    ''' * <p><b>Warning:</b> This class should only be used with analyzers that do not use stopwords
'    ''' * or that add tokens. Also, several stemming analyzers are inappropriate: for example, GermanAnalyzer 
'    ''' * will turn <code>Häuser</code> into <code>hau</code>, but <code>H?user</code> will 
'    ''' * become <code>h?user</code> when using this parser and thus no match would be found (i.e.
'    ''' * using this parser will be no improvement over QueryParser in such cases). </p>
'    ''' *
'    ''' * @author  Ronnie Kolehmainen (ronnie.kolehmainen at ub.uu.se)
'    ''' * @version $Revision$, $Date$
'    ''' </summary>
'    ''' <remarks>From http://www.java2s.com/Open-Source/Java-Document/Net/lucene-connector/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java.htm</remarks>
'    Public Class AnalyzingQueryParser
'        Inherits QueryParser

'        Public Sub New(ByVal fieldName As String, ByVal objAnalyzer As Analyzer)
'            MyBase.New(LuceneCurrentVersion, fieldName, objAnalyzer)
'            Throw New NotImplementedException("Ce parser n'est pas implémenté pour l'instant, en attente de statut")
'        End Sub

'        Public Overrides Function GetWildcardQuery(field As String, termStr As String) As Lucene.Net.Search.Query
'            Return MyBase.GetWildcardQuery(field, termStr)
'        End Function

'        Public Overrides Function GetPrefixQuery(field As String, termStr As String) As Lucene.Net.Search.Query
'            Return MyBase.GetPrefixQuery(field, termStr)
'        End Function

'        Public Overrides Function GetFuzzyQuery(field As String, termStr As String, minSimilarity As Single) As Lucene.Net.Search.Query
'            Return MyBase.GetFuzzyQuery(field, termStr, minSimilarity)
'        End Function

'    End Class
'End Namespace


